package com.yanqu.road.server.manger.messagesubscribe.enums;

import com.yanqu.road.entity.enums.eMessageSubscribeType;

/**
 * 微信消息订阅
 */
public enum MessageSubscribeConfig {


    /**
     * 奖励内容:{{thing5.DATA}}\n温馨提示:{{thing4.DATA}}
     */
    OfflineReward("kBcjN5bPOE0s96VeP89-CerR1qMlHLBXiErY6vl-0Mc", "MSG1324521137207357896299527784755", "90b0d111bda24a6da6ea68934a99a0c7", "离线收益领取提醒", "离线收益领取提醒", MessageSubscribeType.OneTime),

    /**
     * 所有徒弟活力均为满时
     * 温馨提示
     * {{thing2.DATA}}
     *
     * 变更提示
     * {{thing3.DATA}}
     */
    SonRecovery("R1BwCFR3wd7XxrkcJpEfMAH5ZOwHMrQlr30KyUIY1Fw", "MSG1324521137187358011463778224421", "a51e30ede9d54195b6d3f4d0201a7bca", "徒弟培养提醒", "徒弟培养提醒", MessageSubscribeType.OneTime),

    /**
     * 挚友谈心次数为满时
     * 功能名称
     * {{thing1.DATA}}
     *
     * 温馨提示
     * {{thing2.DATA}}
     */
    MistressRecovery("QFZLcsIU43ZaDNO6HHnDSqrmHQNzdCX_emApIYoSRWU", "MSG1324521137237357972723169167666", "44c4e7327c8940589659abcad2a6e604", "挚友谈心提醒", "挚友谈心提醒", MessageSubscribeType.OneTime),

    /**
     * 医馆病人数量达到存储上限时
     * 人数
     * {{number2.DATA}}
     *
     * 提醒事项
     * {{thing3.DATA}}
     */
    HospitalRecovery("Fhs4_JAjTYr79_M1r4m7b5dEnjaF7Tlxrfy2l9tNSLw", "MSG1324521137277357896299527850291", "49c03fdc00244e90917aa0d85376c23c", "医馆接诊提醒", "医馆接诊提醒", MessageSubscribeType.Forever),

    /**
     * 游历体力达到存储上限时
     * 类别
     * {{thing1.DATA}}
     *
     * 温馨提示
     * {{thing2.DATA}}
     */
    TravelRecovery("9w40pa85OVK-A0QEBw62tts0M-fDyZunYPKf8jXNSQg", "MSG1324521137197357896299527801139", "edecd0fd16cd46a8873e72c7fbf4a64a", "外出游历提醒", "外出游历提醒", MessageSubscribeType.OneTime),

    /**
     * 税所存储银两均为满时
     * 时间
     * {{time1.DATA}}
     *
     * 温馨提示
     * {{thing2.DATA}}
     */
    PatronsWarSilverRecovery("F0NP6KCJh_7mlKmbgk2LEUYwUzTV1x5_acTPrZ830FY", "MSG1324521159037357972723169118514", "b3f09556fe4f4bb0a4d74fb75efe89ab", "税所收取提醒", "税所收取提醒", MessageSubscribeType.OneTime),

    /**
     * 中午12:00狩猎开启时提醒
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    NoonHuntTime("TvaSFLWpPax8LGa-dRowAR2TLpPDYX4xedPcMg_KqnY", "MSG1324521137287358011463778257189", "1756b1df66ca4349a0548281ccfd08d5", "狩猎开启提醒", "狩猎开启提醒", MessageSubscribeType.OneTime),

    /**
     * 药铺病人数量达到存储上限时
     * 活动时间
     * {{time1.DATA}}
     *
     * 活动内容
     * {{thing2.DATA}}
     */
    ClinicRecovery("zcSdX3IdGdnTicaGUCU7g86iLGkrwSkhijEHUziP1S8", "", "db83826fe5d145a9a0b09f1c1865ac07", "药铺营业提醒", "药铺营业提醒", MessageSubscribeType.OneTime),


    /**
     * 招商位置被抢占时
     * 物品名称
     * {{thing1.DATA}}
     *
     * 温馨提示
     * {{thing2.DATA}}
     */
    BussinessPosRob("AoHinZ7HRMru475D2zhaKCHRtplzHotXfq4OfMSLjwQ", "MSG1324521746207357896299527817523", "2542675f028c45f1bb17789cff044d5b", "招商被占提醒", "招商被占提醒", MessageSubscribeType.OneTime),

    /**
     * 庄园粮仓收益达到收益上限时
     * 丰收时间
     * {{time2.DATA}}
     *
     * 当前状态
     * {{thing1.DATA}}
     */
    ManorFoodRecovery("28vUTNYOdIN2ODkja3yUGtvahqAcyMRGOuxOyjkTAI0", "", "", "作物收取提醒", "作物收取提醒", MessageSubscribeType.OneTime),


    /**
     * 酒肆体力达到存储上限时
     * 道具名称
     * {{thing4.DATA}}
     *
     * 温馨提示
     * {{thing5.DATA}}
     */
    WineShopRecovery("Be93VX8XLisfuN8RISJ9zZ18hGVB3EBTJXFmA1l_TKw", "", "0578c0f759a946ddb19043016331389b", "酒肆叫号提醒", "酒肆叫号提醒", MessageSubscribeType.OneTime),

    /**
     * 矿场开战提醒：矿场 开战前 5 分钟
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    KuangBattleTime(eMessageSubscribeType.KuangBattleTime, MessageSubscribeType.OneTime),

    /**
     * 商帮之争提醒：商帮之争 活动开启时
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    UnionCampWarTime(eMessageSubscribeType.UnionCampWarTime, MessageSubscribeType.OneTime),

    /**
     * 榷场开启提醒：榷场 活动开启时
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    MonopolyTime(eMessageSubscribeType.MonopolyTime, MessageSubscribeType.OneTime),

    /**
     * 宗门大会提醒：凡人修仙传 宗门大会开始前５分钟
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    XiuXianTime(eMessageSubscribeType.XiuXianTime, MessageSubscribeType.OneTime),

    /**
     * 魂师对决提醒：斗罗世界 魂师对决开始前５分钟
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    DouLuoTime(eMessageSubscribeType.DouLuoTime, MessageSubscribeType.OneTime),

    /**
     * 诸神对决提醒：封神演义 诸神对决开战前５分钟
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    FengShenTime(eMessageSubscribeType.FengShenTime, MessageSubscribeType.OneTime),

    /**
     * 报名提醒：九州棋局 报名期第一天早上１０点
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    JiuZhouApplyTime(eMessageSubscribeType.JiuZhouApplyTime, MessageSubscribeType.OneTime),

    /**
     * 开战提醒：九州棋局 比赛开始前１０分钟
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    JiuZhouBattleTime(eMessageSubscribeType.JiuZhouBattleTime, MessageSubscribeType.OneTime),

    /**
     * 云顶之战提醒：盗墓笔记 云顶之战开战前５分钟
     * 活动时间
     * {{time2.DATA}}
     *
     * 活动内容
     * {{thing3.DATA}}
     */
    DaoMuTime(eMessageSubscribeType.DaoMuTime, MessageSubscribeType.OneTime),

    ;

    /*
     * 微信模板id
     */
    private String wxTemplateId;

    /*
     * 抖音模板id
     */
    private String dyTemplateId;

    /*
     * 支付宝模板id
     */
    private String zfbTemplateId;

    /**
     * 游戏内的 标题
     */
    private String gameTitle;
    /**
     * 游戏内的 内容
     */
    private String gameContent;
    /**
     * 订阅类型
     */
    private MessageSubscribeType type;
    /**
     * 是否在微信模板当中
     */
    private boolean inWxTemplate;
    /**
     * 对应的类型枚举
     */
    private eMessageSubscribeType eMSType;

    MessageSubscribeConfig(String wxTemplateId, String dyTemplateId, String zfbTemplateId, String gameTitle,
                           String gameContent, MessageSubscribeType type) {
        this.wxTemplateId = wxTemplateId;
        this.dyTemplateId = dyTemplateId;
        this.zfbTemplateId = zfbTemplateId;
        this.gameTitle = gameTitle;
        this.gameContent = gameContent;
        this.type = type;
        this.eMSType = null;
    }

    MessageSubscribeConfig(eMessageSubscribeType eMSType, MessageSubscribeType type) {
        this.wxTemplateId = eMSType.getWxTemplateId();
        this.dyTemplateId = eMSType.getDyTemplateId();
        this.zfbTemplateId = eMSType.getZfbTemplateId();
        this.gameTitle = eMSType.getGameTitle();
        this.gameContent = eMSType.getGameContent();
        this.type = type;
        this.eMSType = eMSType;
    }

    public static MessageSubscribeConfig forNumber(String templateId) {
        if (templateId.isEmpty()) {
            return null;
        }
        for (MessageSubscribeConfig item : MessageSubscribeConfig.values()) {
            if (item.wxTemplateId.equals(templateId) || item.dyTemplateId.equals(templateId)) {
                return item;
            }
        }
        return null;
    }

    public String getWxTemplateId() {
        return wxTemplateId;
    }

    public String getGameTitle() {
        return gameTitle;
    }

    public String getGameContent() {
        return gameContent;
    }

    public MessageSubscribeType getType() {
        return type;
    }

    public void setType(MessageSubscribeType type) {
        this.type = type;
    }

    public boolean isInWxTemplate() {
        return inWxTemplate;
    }

    public void setInWxTemplate(boolean inWxTemplate) {
        this.inWxTemplate = inWxTemplate;
    }

    public eMessageSubscribeType geteMSType() {
        return eMSType;
    }

    public void seteMSType(eMessageSubscribeType eMSType) {
        this.eMSType = eMSType;
    }

    public String getDyTemplateId() {
        return dyTemplateId;
    }

    public void setDyTemplateId(String dyTemplateId) {
        this.dyTemplateId = dyTemplateId;
    }

    public String getZfbTemplateId() {
        return zfbTemplateId;
    }
}
